package cn.iocoder.an.module.business.dal.mysql.filedaily;

import java.util.*;

import cn.iocoder.an.framework.common.pojo.PageResult;
import cn.iocoder.an.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.an.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.an.module.business.dal.dataobject.filedaily.FileDailyDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.an.module.business.controller.admin.filedaily.vo.*;

/**
 * 报 Mapper
 *
 * @author zzy
 */
@Mapper
public interface FileDailyMapper extends BaseMapperX<FileDailyDO> {

    default PageResult<FileDailyDO> selectPage(FileDailyPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<FileDailyDO>()
                .betweenIfPresent(FileDailyDO::getOffTime, reqVO.getOffTime())
                .betweenIfPresent(FileDailyDO::getFailureTime, reqVO.getFailureTime())
                .betweenIfPresent(FileDailyDO::getStandbyTime, reqVO.getStandbyTime())
                .betweenIfPresent(FileDailyDO::getRunTime, reqVO.getRunTime())
                .orderByDesc(FileDailyDO::getDevID));
    }

}